<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${ctx}/system/user/list" method="post">
        <input type="hidden" name="pageSize" value="${pageInfo.pageSize}">
        <input type="hidden" name="pageNum" value="${pageInfo.pageNum}">
        <input type="hidden" name="orgId" value="${user.orgId!}">
        <input type="hidden" name="roleId" value="${user.roleId!}">
        <div class="bjui-searchBar">
          	<label>姓名：</label><input type="text" name="username" value="${user.username!}" size="15"/>
          	<label>帐号：</label><input type="text" value="${user.account!}" name="account" size="15" />
          	<label>状态:</label>
            <@h.select name="available" list=fn.getDicValue('AVAILABLE_STATUS') value=user.available defaultOptions= {"":"全部"}/>
            <button type="button" class="showMoreSearch" data-toggle="moresearch" data-name="custom"><i class="fa fa-angle-double-down"></i></button>
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">功能操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        <li><a href="${ctx}/system/user/create" data-toggle="dialog" data-id="createUser" data-mask="true"><i class="fa fa-plus"></i> 新增用户</a></li>
                        <li><a href="#" data-toggle="alertmsg" data-options="{type:'confirm', msg:'你确定要执行该操作吗！', okCall:deleteM();}}" onclick="deleteM();"  data-group="ids">删除选中</a></li>
                        <!-- <li class="divider"></li>
                        <li><a href="" data-toggle="doexport" data-confirm-msg="确定要导出信息吗？">导出<span style="color: green;">全部</span></a></li>
                        <li><a href="" data-toggle="doexportchecked" data-confirm-msg="确定要导出选中项吗？" data-idname="expids" data-group="ids">导出<span style="color: red;">选中</span></a></li> -->
                    </ul>
                </div>
            </div>
            <div class="bjui-moreSearch">
	            <label>手机：</label><input type="text" name="phone" value="${user.phone!}" size="15"/>     
	            <label>邮箱：</label><input type="text" value="${user.email!}" name="email" size="15"/>
	        </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
     <table data-toggle="tablefixed"  data-width="100%">
        <thead>
        <tr>
            <th>姓名</th>
            <th>账号</th>
            <th>手机</th>
            <th>邮箱</th>
            <th>所属组织</th>
            <th>状态</th>
            <th>创建时间</th>
            <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th align="center">操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pageInfo.list as user>
            <tr>
                <td>${user.username!}</td>
                <td>${user.account!}</td>
                <td>${user.phone!}</td>
                <td>${user.email!}</td>
                <td>${user.orgName!}</td>
                <td>${fn.getDicValue('AVAILABLE_STATUS',user.available)!}</td>
                <td>${user.createTime ? datetime}</td>
                <td><input type="checkbox" name="ids" data-group="${user.userId}" data-toggle="icheck" value="${user.userId}"></td>
                <td>
	                <div class="btn-group">
	                	<button type="button" class="btn-default btn-sm dropdown-toggle" data-toggle="dropdown" data-icon="copy">操作<span class="caret"></span></button>
	                    <ul class="dropdown-menu right" role="menu">
	                        <li><a href="${ctx}/system/user/create" data-toggle="dialog" data-id="createUser" data-mask="true"><i class="fa fa-plus"></i> 新增用户</a></li>
	                        <li><a href="${ctx}/system/user/${user.userId}/pwd" data-toggle="dialog" data-id="editUser${user.userId}"  data-mask="true">修改密码</a></li>
	                        <li><a href="${ctx}/system/user/${user.userId}/edit" data-toggle="dialog" data-id="editUser${user.userId}" data-title="编辑用户-${user.username}" data-mask="true">编辑</a></li>
	                    </ul>
	                </div>
                </td>
            </tr>
        </#list>
        </tbody>
    </table>
</div>
<@h.pageFooter />

<script>
 function deleteM(){
	var dels =""; 
	
	$('tbody input[type="checkbox"]:checked').each(function(){ 
	    dels=dels+$(this).val()+",";
	});
	   $.ajax({ 
		     type : "POST", //提交方式  
		     dataType : "text",
	         cache : false,
	         async : false,
	         data:{dels:dels},
		     url : "${ctx}/system/user/deleteM",//路径 
		     success : function(msg) {
		    	 $(this).navtab('refresh');//刷新当前页签
		     } 
		    },'text'); 
} 
</script>
